Skip to content

fix: remove npx from allowed-tools to avoid Bash permission check error#708

Open
kangjinghang wants to merge 1 commit intovercel-labs:mainfrom
kangjinghang:main
Open

fix: remove npx from allowed-tools to avoid Bash permission check error#708
kangjinghang wants to merge 1 commit intovercel-labs:mainfrom
kangjinghang:main

Conversation

@kangjinghang
Copy link

Problem

The /agent-browser skill fails with:

Bash command permission check failed for pattern "!` characters (history expansion), backticks, and `": This command uses shell operators that require approval for safety

Root Cause

The npx command is a shell function created by nvm (Node Version Manager), not an executable file. When the Bash permission checker validates Bash(npx agent-browser:*), it attempts to parse this shell function, which triggers a false positive security check.

Solution

Remove Bash(npx agent-browser:*) from allowed-tools, keeping only Bash(agent-browser:*). Since agent-browser is typically installed globally, npx is not needed and direct invocation works correctly.

This fix resolves the permission check error while maintaining full functionality.

The `npx` command is a shell function created by nvm, not an executable.
When Bash permission checker validates `Bash(npx agent-browser:*)`, it
attempts to parse this function, which triggers a security check error.

Since agent-browser is typically installed globally, `npx` is not needed.
Direct `agent-browser` invocation works fine and avoids this issue.

Fixes issue where `/agent-browser` skill fails with:
"Bash command permission check failed for pattern "!` characters"
@vercel
Copy link
Contributor

vercel bot commented Mar 10, 2026

@kangjinghang is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Collaborator

@ctate ctate left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix — root cause analysis is spot-on! Before merging, could you also remove Bash(npx agent-browser:*) from skills/slack/SKILL.md, skills/electron/SKILL.md, and skills/dogfood/SKILL.md? They have the same pattern and will hit the same error. Happy to merge once those are updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants